package org.neptune.service.redis;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author lwl
 * @date 2019/8/5 14:55
 */
@Component
public class RedisProperties {

	@Value("${spring.neptune.redis.password}")
	private String password;

	/** 单个节点 */
	@Value("${spring.redis.single.address}")
	private String singleNode;

	/** 超时时间 */
	@Value("${spring.neptune.redis.pool.max-wait}")
	private int maxWait;

	/** 最大连接数 */
	@Value("${spring.neptune.redis.pool.max-active}")
	private int maxActive;

	/** 最大空闲连接数 */
	@Value("${spring.neptune.redis.pool.max-idle}")
	private int maxIdle;

	/** 最小空闲连接数 */
	@Value("${spring.neptune.redis.pool.min-idle}")
	private int minIdle;

	@Value("${spring.neptune.redis.database}")
	private int database;

	public int getDatabase() {
		return database;
	}

	public void setDatabase(int database) {
		this.database = database;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSingleNode() {
		return singleNode;
	}

	public void setSingleNode(String singleNode) {
		this.singleNode = singleNode;
	}

	public int getMaxWait() {
		return maxWait;
	}

	public void setMaxWait(int maxWait) {
		this.maxWait = maxWait;
	}

	public int getMaxActive() {
		return maxActive;
	}

	public void setMaxActive(int maxActive) {
		this.maxActive = maxActive;
	}

	public int getMaxIdle() {
		return maxIdle;
	}

	public void setMaxIdle(int maxIdle) {
		this.maxIdle = maxIdle;
	}

	public int getMinIdle() {
		return minIdle;
	}

	public void setMinIdle(int minIdle) {
		this.minIdle = minIdle;
	}
}
